package com.electronsys.dept.service.impl;

import java.util.List;

import com.electronsys.dept.dao.IDeptDAO;
import com.electronsys.dept.service.IDeptService;
import com.electronsys.pojo.Department;
import com.electronsys.pojo.Employee;
import com.electronsys.pojo.Log;
import com.electronsys.pojo.Module;
import com.electronsys.pojo.ModuleContent;

public class DeptServiceImpl implements IDeptService {
	private IDeptDAO deptDao;

	public List<Department> deptList() {
		return deptDao.deptList();
	}

	public IDeptDAO getDeptDao() {
		return deptDao;
	}

	public void setDeptDao(IDeptDAO deptDao) {
		this.deptDao = deptDao;
	}

	public void addDept(Department dept) {
		deptDao.addDept(dept);
	}

	public List<Department> deptList(Integer deptId) {
		return deptDao.deptList(deptId);
	}

	public boolean updateDept(Department dept) {
		System.out.println("update service");
		return deptDao.updateDept(dept);
	}

	public void deleteDept(Integer[] deptId) {
		deptDao.deleteDept(deptId);
	}

	public List<Department> deptListByPage(Integer start, Integer max) {
		return deptDao.deptListByPage(start, max);
	}

	public List<Employee> empList(Integer deptId) {
		return deptDao.empList(deptId);
	}

	public List<Employee> empMessList(Integer empId) {
		return deptDao.empMessList(empId);
	}

	public void addDeptLog(Log log) {
		deptDao.addDeptLog(log);
	}

	@Override
	public List<Log> logList(Integer empId) {
		return deptDao.logList(empId);
	}

	public List<Log> logListByPage(Integer start, Integer max) {
		return deptDao.logListByPage(start, max);
	}

	public List<Employee> empList() {
		return deptDao.empList();
	}

}
